/*
 * Gsoft开发框架
 * Copyright 2015-2020 the original author or authors.
 *
 * Licensed under the Apache License, Version 2.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 *
 *      http://www.apache.org/licenses/LICENSE-2.0
 *
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */

package com.itcs.rongyun;

import com.itcs.rongyun.utils.CommonParamFactory;
import com.itcs.rongyun.utils.MessageUtils;
import com.itcs.rongyun.utils.RongCloudMethodUtil;

/**
 * TODO (描述该文件做什么)
 * 
 * @author LiuPeng
 * @date 2017年12月9日
 * 
 */
public class RongyunDemo {

	public static void main(String[] args) throws Exception {
		// 获取用户token
		String result = RongCloudMethodUtil.getToken("zhangsan", "张三", "");
		// 推送消息
//		String result = RongCloudMethodUtil.push(CommonParamFactory.instance().isToAll(true).title("哈哈优惠了").alert("优惠了,充值优惠啊").build());
//		RongCloudMethodUtil.push(CommonParamFactory.instance().tag(new String[] {"男"}).alert("男同胞们优惠了,充值优惠啊").build());
//		String result = RongCloudMethodUtil.push(CommonParamFactory.instance().userid(new String[] {"zhangsan"}).alert("张三优惠了,充值优惠啊").build());
		// 广播
//		String result = RongCloudMethodUtil.broadcast(CommonParamFactory.instance().isToAll(true).alert("this is a push").build(), MessageUtils.buildMessage("{\"content\":\"你好啊\",\"extra\":\"aa\"}"), "system");
		System.out.println(result);
		
	}

}
